﻿using System;
using System.Collections.Generic;

namespace Common
{
    /// <summary>
    /// Name - Recipe.cs
    /// Description - Class representation of a recipe
    /// Programmer - CSC440 Team One
    /// Modifications -
    ///     1.0 - Initial coding
    /// Known Faults -
    ///     1.0 - None known
    /// </summary>
    public class Recipe
    {
        /// <summary>
        /// Name of the recipe
        /// </summary>
        public string name { get; set; }

        /// <summary>
        /// List of ingredients in the recipe
        /// </summary>
        public List<RecipeIngredient> ingredients { get; set; }

        /// <summary>
        /// Directions required to make the recipe
        /// </summary>
        public string directions { get; set; }

        /// <summary>
        /// The value rated
        /// </summary>
        public int value { get; set; }

        /// <summary>
        /// Number of servings
        /// </summary>
        public string servings { get; set; }

        /// <summary>
        /// RecipeId
        /// </summary>
        public int RecipeID { get; set; }

        /// <summary>
        /// The user the recipe was created by
        /// </summary>
        public User createdBy { get; set; }

        /// <summary>
        /// The date the recipe was submitted
        /// </summary>
        public DateTime dateSubmitted { get; set; }

        public Recipe()
        {
            this.ingredients = new List<RecipeIngredient>();
        }

        /// <summary>
        /// String representation of the Recipe object
        /// </summary>
        /// <returns>Recipe name</returns>
        public override string ToString()
        {
            return this.name;
        }
    }
}